﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Library/Reportes.master" AutoEventWireup="false" CodeFile="DetallePriorizacion.aspx.vb" Inherits="Reportes_DetallePriorizacion" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type ="text/css">

    .AlineacionDerecha
    {
        text-align : right ;
    }

</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<h1>Priorización<asp:HiddenField ID="hdIdhogar" runat="server" Value="0" />
    </h1>
<table>
<tr>
<th colspan="2">
Información general del hogar
</th>
</tr>
<tr>
<td>
Código COBA: <asp:Label ID="lblCodigoCoba" runat="server" Text="Label"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td>
    Código Proyecto: <asp:Label ID="lblCodProyecto" runat="server" 
        Text="Label"></asp:Label>
</td>
</tr> 
</table>

<table>
<tr>
<th>
Resumen priorización
</th>
</tr>
<tr>
<td>

    <asp:Chart ID="Chart1" runat="server" Palette="BrightPastel" BackColor="#F3DFC1"
                    Width="412px" Height="296px" BorderlineDashStyle="Solid" BackGradientStyle="TopBottom"
                    BorderWidth="2" BorderColor="181, 64, 1">
                    <Titles>
                        <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 12.25pt, style=Bold" ShadowOffset="3"
                            Name="Title1" ForeColor="26, 59, 105">
                        </asp:Title>
                    </Titles>
                    <Legends>
                        <asp:Legend TitleFont="Microsoft Sans Serif, 8pt, style=Bold" BackColor="Transparent"
                            Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Enabled="False"
                            Name="Default">
                        </asp:Legend>
                    </Legends>
                    <BorderSkin SkinStyle="Emboss"></BorderSkin>
                    <Series>
                        <asp:Series Name="Default" Color="220, 65, 140, 240" ShadowOffset="1">
                        </asp:Series>            
                        <asp:Series Name="v1" Color= "220, 252, 180, 65" ShadowOffset="1">
                        </asp:Series>
            
            <asp:Series Name="v2" Color="220, 140,65, 240" ShadowOffset="1">
            </asp:Series>
            <asp:Series Name="v3" Color= "220, 100, 180, 65" ShadowOffset="1">
            </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="White"
                            BackColor="OldLace" ShadowColor="Transparent" BackGradientStyle="TopBottom">
                            <Area3DStyle Rotation="10" Perspective="10" Inclination="15" IsRightAngleAxes="False"
                                WallWidth="0" IsClustered="False" />
                            <AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                                <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" Format="C0" />
                                <MajorGrid LineColor="64, 64, 64, 64" />
                            </AxisY>
                            <AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                                <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" IsEndLabelVisible="False" Format="MM-dd" />
                                <MajorGrid LineColor="64, 64, 64, 64" />
                            </AxisX>
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
</td>
<td valign="top">

    <asp:Chart ID="Chart2" runat="server" Palette="BrightPastel" BackColor="#F3DFC1"
                    Width="412px" Height="296px" BorderlineDashStyle="Solid" BackGradientStyle="TopBottom"
                    BorderWidth="2" BorderColor="181, 64, 1">
                    <Titles>
                        <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 12.25pt, style=Bold" ShadowOffset="3"
                            Name="Title1" ForeColor="26, 59, 105">
                        </asp:Title>
                    </Titles>
                    <Legends>
                        <asp:Legend TitleFont="Microsoft Sans Serif, 8pt, style=Bold" BackColor="Transparent"
                            Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Enabled="False"
                            Name="Default">
                        </asp:Legend>
                    </Legends>
                    <BorderSkin SkinStyle="Emboss"></BorderSkin>
                    <Series>
                        <asp:Series Name="Default">
            </asp:Series>            
            <asp:Series Name="v1">
            </asp:Series>
            <asp:Series Name="v2">
            </asp:Series>
            <asp:Series Name="v3">
            </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="White"
                            BackColor="OldLace" ShadowColor="Transparent" BackGradientStyle="TopBottom">
                            <Area3DStyle Rotation="10" Perspective="10" Inclination="15" IsRightAngleAxes="False"
                                WallWidth="0" IsClustered="False" />
                            <AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                                <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" Format="C0" />
                                <MajorGrid LineColor="64, 64, 64, 64" />
                            </AxisY>
                            <AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                                <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" IsEndLabelVisible="False" Format="MM-dd" />
                                <MajorGrid LineColor="64, 64, 64, 64" />
                            </AxisX>
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
</td>
</tr> 
<tr>
<td colspan="2">
<asp:GridView ID="grdResultados" runat="server" AutoGenerateColumns="false">
<Columns>
 <asp:BoundField DataField="visita" HeaderText="Visita" />
 <asp:BoundField DataField="FechaDiligenciamiento" HeaderText="Fecha de visita" />
 <asp:BoundField DataField="Identificador" HeaderText="Identificador" />
 <asp:BoundField DataField="prioridad" HeaderText="Módulo" />
 <asp:BoundField DataField="Porcentaje" HeaderText="Porcentaje" DataFormatString="{0:P2}"  ItemStyle-HorizontalAlign = "Right" >
 <ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha"></ItemStyle>
 </asp:BoundField >

</Columns>
</asp:GridView>

</td>
</tr>
</table>
<br /><br />
<table>
<tr>
<th>
Detalle de priorización por integrantes de la familia
</th>
</tr>
<tr>
<td>

<asp:GridView ID="grdDetalleintegrantes" runat="server" AutoGenerateColumns="False">
<EmptyDataTemplate>
No hay información registrada.
</EmptyDataTemplate>
        <Columns>
            <asp:BoundField DataField="Nombres" HeaderText="Nombres" />
            <asp:BoundField DataField="Apellidos" HeaderText="Apellidos" />
            <asp:BoundField DataField="sexo" HeaderText="Sexo" />
            <asp:BoundField DataField="parentescojefehogar" HeaderText="Parentesco con el Jefe de hogar" />
            <asp:BoundField DataField="Visita" HeaderText="Visita" />
            <asp:TemplateField HeaderText="Edad"  >
                <ItemTemplate>
                    <asp:Label ID="lblAnios" runat="server" Text='<%# eval("años")%>'></asp:Label> años y 
                    <asp:Label ID="lblmeses" runat="server" Text='<%# eval("meses")%>'></asp:Label> meses

                </ItemTemplate>               
            </asp:TemplateField>             
            <asp:BoundField DataField="EducacionP" HeaderText="Prioridad educación" 
                DataFormatString="{0:P2}"  ItemStyle-HorizontalAlign = "Right"  >            

<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha"></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("EducacionP"))*100 > 60.0 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("EducacionP"))*100 > 30.00 and cdbl(eval("EducacionP"))*100 <= 60.00  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("EducacionP"))*100 <= 30.00 %>' />                    
                
                </ItemTemplate>               
            </asp:TemplateField>
            <asp:BoundField DataField="SaludSexualP" 
                HeaderText="Prioridad salud sexual y reproductiva" DataFormatString="{0:P2}" 
                ItemStyle-HorizontalAlign = "Right" >
<ItemStyle HorizontalAlign="Right"  CssClass="AlineacionDerecha" ></ItemStyle>
            </asp:BoundField>
                        <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("SaludSexualP"))*100 > 60.0 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("SaludSexualP"))*100 > 30.00 and cdbl(eval("SaludSexualP"))*100 <= 60.00  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("SaludSexualP"))*100 <= 30.00 %>' />                    
                
                </ItemTemplate>               
            </asp:TemplateField>
            <asp:BoundField DataField="CrecimientoYdesarrolloP" 
                HeaderText="Prioridad crecimiento y desarrollo"  DataFormatString="{0:P2}" 
                ItemStyle-HorizontalAlign = "Right" >
<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha" ></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("CrecimientoYdesarrolloP")) > 0.6 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("CrecimientoYdesarrolloP")) > 0.3 and cdbl(eval("CrecimientoYdesarrolloP")) <=0.6  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("CrecimientoYdesarrolloP")) <= 0.3 %>' />                    
                </ItemTemplate>               
            </asp:TemplateField>
            <asp:BoundField DataField="ComplementarioP" 
                HeaderText="Prioridad complementario" DataFormatString="{0:P2}" 
                ItemStyle-HorizontalAlign = "Right" >
<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha" ></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("ComplementarioP")) > 0.6 %>' />
                    <asp:Image Width="50%" Height="50%"  ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("ComplementarioP")) > 0.3 and cdbl(eval("ComplementarioP")) <=0.6  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("ComplementarioP")) <= 0.3 %>' />                    
                </ItemTemplate>               
            </asp:TemplateField>
            
        </Columns>
    </asp:GridView>
</td>
</tr> 
</table>

<br />
<h2>Módulo psicosocial</h2>
<table>
<tr>
<th>
Priorización psicosocial familiar y comunitario
</th>
</tr>
<tr>
<td>
<asp:GridView ID="GrdPsicoSocialHogar" runat="server" AutoGenerateColumns="False">
<EmptyDataTemplate>
No hay información registrada.
</EmptyDataTemplate>
        <Columns>
            <asp:BoundField DataField="Codcoba" HeaderText="Código Coba" />
            <asp:BoundField DataField="Visita" HeaderText="Visita" />
            <asp:BoundField DataField="FechaDiligenciamiento" HeaderText="Fecha de visita" />
            <asp:BoundField DataField="PsicosocialComunitarioP" HeaderText="Prioridad psicosocial comunitario" 
                DataFormatString="{0:P2}"  ItemStyle-HorizontalAlign = "Right"  >            

<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha"></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("PsicosocialComunitarioP"))*100 > 60.0 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("PsicosocialComunitarioP"))*100 > 30.00 and cdbl(eval("PsicosocialComunitarioP"))*100 <= 60.00  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("PsicosocialComunitarioP"))*100 <= 30.00 %>' />                    
                
                </ItemTemplate>               
            </asp:TemplateField>
            <asp:BoundField DataField="PsicosocialFamiliarP" 
                HeaderText="Prioridad psicosocial familiar" DataFormatString="{0:P2}" 
                ItemStyle-HorizontalAlign = "Right" >
<ItemStyle HorizontalAlign="Right"  CssClass="AlineacionDerecha" ></ItemStyle>
            </asp:BoundField>
                        <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("PsicosocialFamiliarP"))*100 > 60.0 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("PsicosocialFamiliarP"))*100 > 30.00 and cdbl(eval("PsicosocialFamiliarP"))*100 <= 60.00  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("PsicosocialFamiliarP"))*100 <= 30.00 %>' />                    
                
                </ItemTemplate>               
            </asp:TemplateField>
            <asp:BoundField DataField="PsicosocialIndividualP" 
                HeaderText="Prioridad Psicosocial individual (promedio de la priorización de los beneficiarios)"  DataFormatString="{0:P2}" 
                ItemStyle-HorizontalAlign = "Right" >
<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha" ></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("PsicosocialIndividualP")) > 0.6 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("PsicosocialIndividualP")) > 0.3 and cdbl(eval("PsicosocialIndividualP")) <=0.6  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("PsicosocialIndividualP")) <= 0.3 %>' />                    
                </ItemTemplate>               
            </asp:TemplateField>           
            <asp:BoundField DataField="PsicosocialP" HeaderText="Prioridad psicosocial" 
                DataFormatString="{0:P2}" ItemStyle-HorizontalAlign = "Right" >
<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha" ></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image Width="50%" Height="50%"  ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("PsicosocialP")) > 0.6 %>' />
                    <asp:Image Width="50%" Height="50%"  ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("PsicosocialP")) > 0.3 and cdbl(eval("PsicosocialP")) <=0.6  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("PsicosocialP")) <= 0.3 %>' />                    
                </ItemTemplate>               
            </asp:TemplateField>
            
        </Columns>
    </asp:GridView>
</td>
</tr> 
</table>
<br />
<br />
<table>
<tr>
<th>
Priorización psicosocial individual de beneficiarios directos
</th>
</tr>
<tr>
<td>
<asp:GridView ID="grdPsicoSocialIndividual" runat="server" AutoGenerateColumns="False">
<EmptyDataTemplate>
No hay información registrada.
</EmptyDataTemplate>
        <Columns>
            <asp:BoundField DataField="Nombres" HeaderText="Nombres" />
            <asp:BoundField DataField="Apellidos" HeaderText="Apellidos" />
            <asp:BoundField DataField="sexo" HeaderText="Sexo" />
            <asp:BoundField DataField="parentescojefehogar" HeaderText="Parentesco con el Jefe de hogar" />
            <asp:BoundField DataField="Visita" HeaderText="Visita" />
            <asp:BoundField DataField="PsicosocialIndividualP" HeaderText="Prioridad psicosocial individual" 
                DataFormatString="{0:P2}"  ItemStyle-HorizontalAlign = "Right"  >            

<ItemStyle HorizontalAlign="Right" CssClass="AlineacionDerecha"></ItemStyle>
            </asp:BoundField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <asp:Image  Width="50%" Height="50%" ID="Image1" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg" Visible = '<%# cdbl(eval("PsicosocialIndividualP"))*100 > 60.0 %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image2" runat="server" ImageUrl="~/Imagenes/Semamarillo.jpg" Visible = '<%# cdbl(eval("PsicosocialIndividualP"))*100 > 30.00 and cdbl(eval("PsicosocialIndividualP"))*100 <= 60.00  %>' />
                    <asp:Image  Width="50%" Height="50%" ID="Image3" runat="server" ImageUrl="~/Imagenes/Semverde.jpg"  Visible = '<%# cdbl(eval("PsicosocialIndividualP"))*100 <= 30.00 %>' />                    
                
                </ItemTemplate>               
            </asp:TemplateField>
            
        </Columns>
    </asp:GridView>
</td>
</tr> 
</table>



    <p>Las categorias están dadas así:</p>
    <table>
    <tr>
    <td>
      <asp:Image  Width="50%" Height="50%"  ID="Image11" runat="server" ImageUrl="~/Imagenes/SemVerde.jpg"/>
    </td>
    <td>
    entre 0% y 30%  prioridad de acompañamiento baja
    </td>
    </tr>
    <tr>
    <td>
      <asp:Image Width="50%" Height="50%"  ID="Image4" runat="server" ImageUrl="~/Imagenes/SemAmarillo.jpg"/>
    </td>
    <td>
    entre 31% y 60%  prioridad de acompañamiento media
    </td>
    </tr>
    <tr>
    <td>
      <asp:Image Width="50%" Height="50%"  ID="Image5" runat="server" ImageUrl="~/Imagenes/SemRojo.jpg"/>
    </td>
    <td>
    mayor a 60%  prioridad de acompañamiento alta
    </td>
    </tr>

    </table>
    <br />
    <br />

</asp:Content>

